<?php
namespace app\admin\model;
use think\Db;
use think\Model;

class InvoiceExpressModel extends Model
{
	 public function __construct()
    {
        parent::__construct();

    }
    public function addExpress($data)
    {
    	return Db::name('invoice_express')->insertGetId($data);
    }

    public function getExpressByICd($invoice_common_id,$field='a.*')
    {
        return Db::name('invoice_express a')->join('admin b','a.sender_id = b.admin_id','LEFT')
            ->where('invoice_common_id='.$invoice_common_id)->field($field)->find();
    }

}
